package kr.hkit.PowerJava.chapter06.work;

import java.util.Scanner;

public class Moonje5 {
	public static void main(String[] args) {
		double x;
		Scanner input = new Scanner(System.in);
		System.out.println("x의 값을 실수로 입력하세요 : ");
		x = input.nextDouble();

		if (x >= 0)
			System.out.println("7x + 2 = " + (7 * x + 2));
		else
			System.out.println("(x * x * x) - (9 * x) + 2 = "
					+ (x * x * x - 9 * x + 2));

	}
}
